package com.kis.bot;

import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
import java.util.Date;

/**
 * Created by wongloong on 16-9-1.
 */
public class Test {
    public static void main(String[] args) {
        ScriptEngineManager ls = new ScriptEngineManager();
        ScriptEngine engine = ls.getEngineByName("js");
        try {
            engine.eval("print (~ new Date())");

        } catch (ScriptException e) {
            e.printStackTrace();
        }
    }
}
